public class JudgingLeapYears {

    public static void main(String[] args) {
        int count = 0;
        for (int i = 1000; i <=2000 ; i++) {
            if((i%4==0 && i%100!=0) || i%400==0) {
                count++;
                System.out.println(i);
            }
        }
        System.out.println("1000-2000共有闰年："+count);
    }
}
